package com.tiancheng.trade.order.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tiancheng.trade.order.model.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 退款实体
 *
 * @author kellen
 * @date 2024-03-18
 */
@Data
@TableName(value = "refund_orders")
@EqualsAndHashCode(callSuper = true)
public class RefundOrders extends BaseEntity implements java.io.Serializable {

    /** 退款id */
    private String refundId;
    /** 主订单号 */
    private String orderId;
    /** 退款单号 */
    private String paymentId;
    /** 退款流水号 */
    private String flowId;
    /** 对应的支付流水号 */
    private String payFlowId;
    /** 用户id */
    private String uid;
    /** 申请退款金额 */
    private Integer refundApplyAmount;
    /** 实际退款金额 */
    private Integer refundAmount;
    /** 退款状态 */
    private String refundStatus;
    /** 退款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime refundTime;
    /** 退款原因 */
    private String refundReason;

    /**
     * 核销状态
     */
    private String verificationStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    /**
     * 核销时间
     */
    private LocalDateTime verificationTime;
    /** appid */
    private String appId;
    /** 请求ip */
    private String ip;
    /**
     * 退款子订单
     */
    @TableField(exist = false)
    private List<RefundOrdersDetail> subRefundOrders;
}